package org.paysim;

import org.mybatis.spring.annotation.MapperScan;
import org.openapitools.jackson.nullable.JsonNullableModule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import com.fasterxml.jackson.databind.Module;

@SpringBootApplication
@MapperScan("org.paysim.mapper")
@NacosPropertySource(dataId = "application")
public class OpenApiGeneratorApplication {

    public static void main(String[] args) {
        SpringApplication.run(OpenApiGeneratorApplication.class, args);
    }

    @Bean(name = "org.openapitools.OpenApiGeneratorApplication.jsonNullableModule")
    public Module jsonNullableModule() {
        return new JsonNullableModule();
    }

}